<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['voucher.mgmt.label']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%">
		<h:panelGroup>
		    <h:outputText value="#{messages['voucher.entry.update.label']}" styleClass="sub_header" />
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<h:panelGrid>
		<t:selectOneRadio layout="lineDirection" styleClass="standardText" >
		   	<f:selectItem  itemLabel="#{messages['voucher.member.label']}" itemValue="" />
		   	<f:selectItem itemLabel="#{messages['voucher.non.member.label']}" itemValue="1"/>
		   	<f:selectItem itemLabel="#{messages['voucher.guest.label']}" itemValue="2"/>
		</t:selectOneRadio> 
	</h:panelGrid>
	
	<h:panelGrid>
		<h:outputText value="#{messages['voucher.member.label']}" styleClass="standardText_Label" />	
	</h:panelGrid>	
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="memberNo" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="memberNo" value="#{messages['voucher.member.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="memberNo" styleClass="standardText" value="" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>	
		
		<h:outputText></h:outputText>
		<t:message for="agreementNo" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="agreementNo" value="#{messages['voucher.agreement.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:selectOneMenu id="agreementNo" styleClass="standardText" value="" required="true">
				<f:selectItem itemLabel="#{messages['please.select']}" itemValue="" />
			</t:selectOneMenu>
		</h:panelGroup>
		
		<h:outputText value="#{messages['voucher.agreement.date.label']}" styleClass="standardText_Label" />
		<h:outputText value="01/04/2008" styleClass="standardText" />
		
		<h:outputText value="#{messages['voucher.membership.type.label']}" styleClass="standardText_Label" />
		<h:outputText value="Silver" styleClass="standardText" />
		
		<h:outputText value="#{messages['voucher.member.name.label']}" styleClass="standardText_Label" />
		<h:outputText value="David Beckam" styleClass="standardText" />
	</t:panelGrid>
	
	<rich:spacer height="10"></rich:spacer>
	
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<rich:dataTable id="data" var="demo" value="#{demoBean.productList}" rows="20" width="99%">
				<rich:column style="text-align:center;width:5%;" >
					<f:facet name="header">
						<h:selectBooleanCheckbox id="chkAll" onclick="checkAll(this.form,this)" ></h:selectBooleanCheckbox>
					</f:facet>
					<h:selectBooleanCheckbox id="chk" value=""></h:selectBooleanCheckbox>
				</rich:column>
				
				<rich:column style="text-align:center;width:20%;">
					<f:facet name="header">
						<h:outputText value="#{messages['voucher.no.column']}"></h:outputText>
					</f:facet>
					<h:outputText value="11111"></h:outputText>
				</rich:column>		
				
				<rich:column style="text-align:center;width:20%;">
					<f:facet name="header">
						<h:outputText value="#{messages['voucher.issue.date.column']}"></h:outputText>
					</f:facet>
					<h:outputText value="01/05/2008"></h:outputText>
				</rich:column>
				
				<rich:column style="text-align:center;width:20%;">
					<f:facet name="header">
						<h:outputText value="#{messages['voucher.expiry.date.column']}"></h:outputText>
					</f:facet>
					<h:outputText value="01/05/2009"></h:outputText>
				</rich:column>
				
				<rich:column style="text-align:center;width:15%;">
					<f:facet name="header">
						<h:outputText value="#{messages['voucher.no.of.nights.column']}"></h:outputText>
					</f:facet>
					<h:outputText value="1"></h:outputText>
				</rich:column>
				
				<rich:column style="text-align:center;width:15%;">
					<f:facet name="header">
						<h:outputText value="#{messages['voucher.no.of.person.column']}"></h:outputText>
					</f:facet>
					<h:outputText value="1"></h:outputText>
				</rich:column>
			</rich:dataTable>
		</h:panelGroup>
		
		<rich:datascroller align="left"  for="data" maxPages="20" />
		
		<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
			<h:outputText></h:outputText>
			<t:panelGrid columns="2">
				<h:commandButton value="#{messages['add.new.voucher']}" styleClass="button"></h:commandButton>
				<h:commandButton value="#{messages['remove.voucher']}" styleClass="button"></h:commandButton>
			</t:panelGrid>
		</t:panelGrid>
	</h:panelGrid>
</rich:panel>	